package com.smartao.core.service;

import java.io.Serializable;

import org.springframework.transaction.annotation.Transactional;

import com.smartao.core.orm.entity.BaseEntity;

/**
 * Service接口
 * @param <T> 实体类型
 * @param <ID> 主键类型
 * @author Ricky
 */
@Transactional(readOnly=true)
public interface BaseService<T extends BaseEntity<T>, ID extends Serializable> {
	
	public T findOne(ID id);
	
	@Transactional(readOnly=false)
	public void save (T entity);
	
	@Transactional(readOnly=false)
	public void delete (T entity);
	
	@Transactional(readOnly=false)
	public void delete (ID id);
}
